#import "UnveilVortexController.h"
        
#import "UnveilVortexModel.h"
#import "UnveilVortexCell.h"
#import "Masonry.h"

@interface UnveilVortexController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *oasisUnderwaterMotionTableView;
@property (nonatomic, strong) NSMutableArray *hammerOpulentDatas;

@end

@implementation UnveilVortexController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self leapfrogKeyholeConfigsview];
	[self heatwaveKitegetData];
}


//: 初始化页面UI
- (void)leapfrogKeyholeConfigsview {

	[self.view addSubview:self.oasisUnderwaterMotionTableView];
	[self.oasisUnderwaterMotionTableView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.leading.trailing.equalTo(self.view);
		make.top.equalTo(self.view);
		make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
	}];
}


//: 懒加载数据模型数组
- (NSMutableArray *)hammerOpulentDatas {
	if (!_hammerOpulentDatas) {
		_hammerOpulentDatas = [NSMutableArray array];
	}
	return _hammerOpulentDatas;
}

- (UITableView *)figHandleTableView {
    if (!_oasisUnderwaterMotionTableView) {
        _oasisUnderwaterMotionTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
        _oasisUnderwaterMotionTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
        _oasisUnderwaterMotionTableView.estimatedRowHeight = 0;
        _oasisUnderwaterMotionTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
        _oasisUnderwaterMotionTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
        _oasisUnderwaterMotionTableView.delegate = self;
        _oasisUnderwaterMotionTableView.dataSource = self;
        _oasisUnderwaterMotionTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
        _oasisUnderwaterMotionTableView.showsVerticalScrollIndicator = NO;
        _oasisUnderwaterMotionTableView.showsHorizontalScrollIndicator = NO;
        _oasisUnderwaterMotionTableView.backgroundColor = UIColor.clearColor;
    }
    return _oasisUnderwaterMotionTableView;
}

//: 获取数据模型
- (void)heatwaveKitegetData {
	
}

#pragma mark - UITableView DataSource 
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.hammerOpulentDatas.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UnveilVortexCell *zestEchoesArtistry = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([UnveilVortexCell class])];
    if (zestEchoesArtistry == nil) {
        zestEchoesArtistry = [[UnveilVortexCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([UnveilVortexCell class])];
    }
    zestEchoesArtistry.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return zestEchoesArtistry;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
	UnveilVortexModel *kingdomNomadBlaze = self.hammerOpulentDatas[indexPath.row];
	return kingdomNomadBlaze.hopeLushJoyousCellHeight;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
